/**
* @Title: caseAuditList_Ctrl.js
* @Description: TODO
* Copyright: Copyright (c) 2014 
 * Company:中国平安
*
* @Project HIMS-FWA
* @date 2014年10月27日 下午4:43:38
* @version V1.0
*/
;
(function(){
	'use strict';
	
	var app = angular.module('fwa.mainApp');
	app.controller('pointsMedicalListCtrl', ['$scope','$state','$modal','PointsMedicalListService','BaseURL','Modal','FwaTabsetService',
	                                function($scope,$state,$modal,pointsMedicalListService,baseUrl,Modal,fwaTabsetService){


		/*$scope.addOnClick = function(){
			fwaTabsetService.selectTab('caseAudit.caseAuditAdd',null,false);
		}
		
		$scope.columns = [
		{
			label : '事件号',
			map : 'problemCode',
			width : '10%',
			 cellTemplate:'<a  ng:bind="data.problemCode" '+
			 	'ng-click="queryByProblemNo(data.problemCode)"></a>'}, 
		{
			label : '事件时间段',
			map : 'periodDate',
			width : '20%'
		}, {
			label : '事件要点',
			map : 'keyPoint',
			width : '20%'
		}, {
			label : '来源方式',
			map : 'sourceType',
			width : '10%'
		}, {
			label : '提交日期',
			map : 'submitDate',
			width : '15%'
		}, {
			label : '关联案件号',
			map : 'caseCode',
			width : '15%'
		}, {
			label : '状态',
			map : 'problemStatus',
			width : '5%'
		}, {
			label : '操作',
			map : 'operations',
			width : '5%',
			cellTemplate:'<a  ng:bind="data.problemCode" '+
	 		'ng-click="queryDetail(data.problemCode)"></a>'}];
		
		$scope.queryDetail = function(data){
			//$state.go('caseAudit.auditDispatch',{problemNo:data});
			$state.go('caseAudit.auditFindDispatch',{problemNo:data});
			//$state.go('caseAudit.reviewResultSurveyDispatch',{problemNo:data});
		}
		
		$scope.queryByProblemNo = function(data){
			fwaTabsetService.selectTab('caseAudit.caseAuditDetail',{problemCode:data},false);
		}
		
		
		$scope.onReset = function(){
	        	$scope.params.orgName=null;
	        	$scope.params.orgCode=null;
	        	$scope.params.doctorName=null;
	        	$scope.params.jobLicense=null;
	        	$scope.params.sourceType=null;
	        	$scope.params.sbmitDate={start:null,end:null};
	        };
	        
        $scope.params = {
                page:"0",
                pageSize:"20"
            };
        
        *//**
	     * 
	     **//*
	    $scope.onSubmit = function(){
	    	var fparam = $scope.params;
	    	if($scope.params.sbmitDate){
		    	var start = $scope.params.sbmitDate.start;
		    	var end = $scope.params.sbmitDate.end;
		    	fparam.start = start;
		    	fparam.end = end;
	    	}
	    	if(fparam.orgName=='') { 
	    		fparam.orgName=null;
    		}          
	    	if(fparam.orgCode=='') { 
	    		fparam.orgCode=null;
    		}          
	    	if(fparam.doctorName=='') { 
	    		fparam.doctorName=null;
    		}        
	    	if(fparam.jobLicense=='') { 
	    		fparam.jobLicense=null;
    		}        
	    	if(fparam.sourceType=='') { 
	    		fparam.sourceType=null;
    		}        
	    	caseAuditListService.query(fparam).success(function(rst){
	    		if(rst){
            		$scope.tableData = rst.result;
        			$scope.totalCount = rst.totals.total;
	    		}
	    	});
	    }
	    
	    $scope.onSubmit();*/
        $scope.goback =function()
        {
           // var problemNo=$scope.UrlParams.problemNo;
           // fwaTabsetService.selectTab('caseAuditProject',{problemNo:problemNo},false);
        }
	// end line	
	}]);
})();
